<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>登录ip管理</title>
    <link th:href="@{/img/Bandit.ico}" rel="icon">
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet">
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div th:replace="~{commons/common::BackHeader}"></div>
    <div class="layui-body">

        <table id="visitor-list" lay-filter=""></table>

    </div>
</div>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/layui/layui.js}"></script>
<script type="text/javascript"  th:inline="none">

    var prefix_back = '/back/user';
    var prefix_front = '/front';

    layui.use(['element', 'layer', 'util','table','form'], function() {
        var element = layui.element
            , layer = layui.layer
            , util = layui.util
            , form = layui.form
            , table = layui.table
            , $ = layui.$;
        //执行渲染
        table.render({
            elem: '#visitor-list' //指定原始表格元素选择器（推荐id选择器）
            ,url: prefix_back + '/visitorQuery'
            ,width: 1600
            ,cols: [[
                {type:'checkbox', fixed: 'left'}
                ,{field:'ip',fixed:true, title: 'IP地址'}
                ,{field:'username',fixed:true, title: '登录账号'}
                ,{field:'count',fixed:true, title: '登录次数'}
            ]] //设置表头
            ,page: true
            ,limit:10
        });

    });
</script>
</body>
</html>